const express=require('express');
const slideImgService=require('../services/slideImgService');
const wearService=require('../services/wearService');
var router=express.Router();

router.use('/img', async function (req,res,next) {
    var data=await slideImgService.findAllSlideImgs();
    //console.log(data);
    res.send(data);
});
//men路由
router.use('/mens', async function (req,res,next) {
    var data=await wearService.findByMenKind(req.query.kind);
    //console.log(data);kind
    res.send(data);
});
//women路由
router.use('/womens', async function (req,res,next) {
    var data=await wearService.findByWomenKind(req.query.kind);
    //console.log(data);kind
    res.send(data);
});
//kid路由
router.use('/kids', async function (req,res,next) {
    var data=await wearService.findByKind(req.query.kind);
    //console.log(data);kind
    res.send(data);
});
//mobile路由
router.use('/mobiles', async function (req,res,next) {
    var data=await wearService.findByMobileKind(req.query.kind);
    //console.log(data);kind
    res.send(data);
});
exports.router=router;







